#include<stdio.h>
/*
double fact( int n )
{
    if(n==1||n==0) return 1;
    return n*fact(n-1);
}
double factsum( int n )
{
    if(n==0) return 0;
    if(n==1) return 1;
    return fact(n) + fact(n-1);
}
*/
double fact(int n)
{
	if (n > 1)
		return n * fact(n - 1);
 
	return 1;
}
 
 
double factsum(int n)
{
	double sum = 0;
 
	for (int i = 1; i <= n; i++)
	{
		sum += fact(i);
	}
	return sum;
}
int main()
{
	printf("%d",fact(9));
}
